<template>
<!-- 辅助检查 -->
  <div>
    <div v-for="(item,index) in checkList" :key="index" class="laboratory_project_box">
      <div @click="toggleCheck(index)" class="content-box">
        <el-row class="title">
          <!-- <el-col :span="12">{{item.time}} - 复诊 - 李军</el-col> -->
          <el-col :span="12">{{item.time}} - {{item.doctorName}}</el-col>
          <el-col :span="12" style="text-align: right;">
            <span style="margin-right:10px;font-size:16px;color:red;">查看</span>
            <i class="glyphicon glyphicon-pencil" style="cursor: pointer;"></i>
          </el-col>
        </el-row>
      </div>
      <!-- <ul class="nav_project">
        <li :class="{'active':flog==0}"  @click="getLaboratory(0)" >血脂四项</li>
        <li :class="{'active':flog==1}"  @click="getLaboratory(1)" >肝功十二项</li>
      </ul> -->
      <div v-if="flog==index">
        <el-row>
          <el-col class="laboratory_title" :span="24">{{item.payStatusDisplay}} - （{{item.checkCode}} <span :class="[{'success-color':item.payStatus==1},{'warning-color':item.payStatus==0||item.payStatus==-1},{'gay_color':item.payStatus==2||item.payStatus==3}]">（ {{item.payStatus | changeAssist(payList)}} ）</span> ）</el-col>
        </el-row>
        <el-row class="laboratory_remark">
          <el-col :span="6">开单医生：{{item.doctorName}}</el-col>
          <!-- <el-col :span="6">开单时间：2019-07-15 09:11:23</el-col> -->
          <el-col :span="6">报告时间：{{item.time}}</el-col>
          <!-- <el-col :span="6">报告人：李军</el-col> -->
        </el-row>
        <!-- <el-row class="alert-warning">
          <el-col :span="24">诊断：</el-col>
          <el-col :span="24">备注：1</el-col>
        </el-row> -->
        <el-row class="assist_box">
             <!-- <el-col :span="24">
                <h4 class="assist_label">检查图片：</h4>
                <p class="assist_remark">
                    <img @click="zoomImg('/img/icon.png')" class="examine_img" src="/img/icon.png" />
                </p>
            </el-col> -->
            <el-col :span="24">
                <h4 class="assist_label">描述：</h4>
                <p class="assist_remark">
                {{item.describe?item.describe:"暂无"}}
                </p>
            </el-col>
            <el-col :span="24">
                <h4 class="assist_label">结论：</h4>
                <p class="assist_remark">
                   {{item.result?item.result:"暂无"}}
                </p>
            </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ["detail"],
  data() {
    return {
      tableList: [],
      flog:0,
      checkList:"",
      payList:[]
    };
  },
  mounted(){
    let th=this;
    th.getDetail();
    let fn=async function(){
      th.payList = await th.getCommonConfigByKey("支付状态");
    }
    fn();
  },
  methods:{
      getLaboratory(type){
          this.flog=type;
      },
      getDetail(){
        let th=this;
        th.$api.getCureAssistDetailById({patientId:th.detail.patientId}).then(res=>{
          if(res.executed){
            let list=res.data;
            for(let i=0;i<list.length;i++){
              if(i==0){
                list[i].show=true;
              }else{
                list[i].show=false
              }
            }
             th.checkList=list;
          }
        })
      },
      toggleCheck(num){
        let th=this;
        th.flog=num;
      },
      getBasic(){
        let th=this;

      }
  }
};
</script>
<style lang="scss" scoped>
@import "../_css/detail.scss";
@import "../_css/examine.scss";
.content-box{
  background-color: #f7f7f7!important;
  text-indent: 10px;
  cursor: pointer;
}
.laboratory_project_box{
  border: none;
  margin-bottom: 10px;
}
.visit_detail_box .content-box .title{
  background: none;
  padding-left: 0;
}
</style>